package com.tm.fiverole.result;

/**
 * @author wangSang
 * @create 2022-08-18 13:54
 */
public enum ResultEnum {

    SUCCESS(200,"操作成功"),
    ERROR(201,"操作失败"),
    INSPECT_ERROR(400,"参数异常"),
    LOGIN_SUCCESS(200,"登录成功"),
    LOGIN_ERROR(201,"登录失败"),
    ADD_ERROR(201,"用户名已出现"),
    DELETE_ERROR(201,"用户正在使用"),
    DEL_ERROR(201,"下面还有PID"),
    ENUM_ERROR(201,"不可修改到子字节的"),
    NOT_LOGIN_ERROR(202,"登录失败或未登录"),
    NO_PERMISSION_ERROR(203,"权限不足"),
    USERNAME_NOT_EXISTED(204,"用户名不存在"),
    ACCOUNT_IS_LOCKED(205,"用户已锁定"),
    USERNAME_OR_PASSWORD_ERROR(206,"账号密码错误"),
    LOG_IN_ERROR(207,"登录失败失败失败"),
    TOKEN_HASH_EXPIRED(208,"令牌已过期"),
    TOKEN_IS_INVALID(209,"令牌无效"),
    ;

    private Integer code;
    private String massage;

    ResultEnum(Integer code, String massage) {
        this.code = code;
        this.massage = massage;
    }

    public Integer getCode() {
        return code;
    }

    public String getMassage() {
        return massage;
    }
}
